package com.example.oauth2demo.config;

import com.example.oauth2demo.interceptor.AuthInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author karidyang
 * @since Date: 2021-04-19
 **/
//@Configuration
public class WebMvcConfiguration implements WebMvcConfigurer {
//    @Autowired
//    private AuthInterceptor authInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {

//        registry.addInterceptor(authInterceptor)
//                .excludePathPatterns("/favicon.ico", "/login", "/login_callback")
//                .addPathPatterns("/**");

        WebMvcConfigurer.super.addInterceptors(registry);
    }
}
